import Index from '@/components/SvgIcon/index.vue'
import type { App, Component } from 'vue'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import * as AntIconsVue from '@ant-design/icons-vue'


//导入全局组件
const components: { [name: string]: Component } = { SvgIcon: Index }

export default {
  install(app: App) {
    Object.keys(components).forEach((key: string) => {
      app.component(key, components[key])
    })

    for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
      app.component("el-"+key, component)
    }  for (const [key, component] of Object.entries(AntIconsVue)) {
      app.component("ant-"+key, component)
    }
  },
}
